/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.vng.zing.zprofilefrontend.common;

import com.vng.zing.configer.ZINIConfiguration;
import com.vng.zing.logger.ZLogger;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.log4j.Logger;

/**
 *
 * @author namhh
 */
public class Properties {

    private ZINIConfiguration configuration;
    private static Properties _INSTANCE;
       private static final Logger _Logger = ZLogger.getLogger(Properties.class);


    private Properties() throws ConfigurationException {
        configuration = new ZINIConfiguration("./conf/properties.config.ini");
    }

    public static synchronized Properties getInstance() {
        try {
            return (null == _INSTANCE) ? _INSTANCE = new Properties() : _INSTANCE;
        } catch (Exception ex) {
            _Logger.equals(ex.toString());
        }
        return null;
    }

    public String get(String key) {
        return configuration.getString(key);
    }
}
